switch: remove unnecessary gtk_widget_show calls
authorTimm Bäder <mail@baedert.org>
Thu, 23 Feb 2017 16:07:52 +0000 (17:07 +0100)
committerTimm Bäder <mail@baedert.org>
Thu, 2 Mar 2017 14:16:08 +0000 (15:16 +0100)
gtk/gtkswitch.c

index cc2e1ff96fbac99b7759b1efc014d2d66fe8f379..c84f57be5efc3071b3ca30e697e69de6941a0346 100644 (file)
@@ -817,7 +817,6 @@ gtk_switch_init (GtkSwitch *self)
 
   priv->slider = g_object_new (GTK_TYPE_BUTTON, "css-name", "slider", NULL);
   gtk_widget_set_parent (priv->slider, GTK_WIDGET (self));
-  gtk_widget_show (priv->slider);
 
   gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self));
   gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), FALSE);
@@ -848,14 +847,12 @@ gtk_switch_init (GtkSwitch *self)
    */
   priv->on_label = gtk_label_new (C_("switch", "ON"));
   gtk_widget_set_parent (priv->on_label, GTK_WIDGET (self));
-  gtk_widget_show (priv->on_label);
 
   /* Translators: if the "off" state label requires more than three
    * glyphs then use WHITE CIRCLE (U+25CB) as the text for the state
    */
   priv->off_label = gtk_label_new (C_("switch", "OFF"));
   gtk_widget_set_parent (priv->off_label, GTK_WIDGET (self));
-  gtk_widget_show (priv->off_label);
 }
 
 /**